Mac PHP 安装 pecl
官方
Use curl as shown below to download the go-pear.phar file or just download the go-pear.phar file via your browser.
1 | curl -O https://pear.php.net/go-pear.phar |
You’re now ready to configure PEAR for installation.
First you need to change the Installation Base.
- So type 1, and then press Enter.
- Enter /usr/local/pear
- Press Enter.
Then, you will need to change the Binaries directory.
- Type 4, and then press Enter.
- Enter /usr/local/bin
- Press Enter.
Once you have changed the Installation Base and the Binaries Directory, press Enter to install PEAR.
中文安装指导
pear/pecl 需要单独进行安装,以下是安装步骤
- 下载pear
1 | curl -O http://pear.php.net/go-pear.phar |
- 安装pear
1 | sudo php -d detect_unicode=0 go-pear.phar |
- 执行以上命令后会进行安装过程,会有一些配置选项
1 | 输入1,回车,输入pear路径为:/usr/local/pear |
- 回车两次,其他让其默认,安装完成
- 可以通过命令检查pear安装是否成功 `pear version